package com.demo.webflux.spring5core.c7.controller;

import com.demo.webflux.spring5core.c7.anno.Autowired;
import com.demo.webflux.spring5core.c7.anno.Controller;
import com.demo.webflux.spring5core.c7.anno.RequestMapping;
import com.demo.webflux.spring5core.c7.anno.RequestParam;
import com.demo.webflux.spring5core.c7.service.DemoService;
import com.demo.webflux.spring5core.c7.servlet.domain.HttpServletRequest;
import com.demo.webflux.spring5core.c7.servlet.domain.HttpServletResponse;

@Controller
@RequestMapping("/demo")
public class DemoController {

	@Autowired
	private DemoService demoService;

	@RequestMapping("/query")
	public String query(HttpServletRequest request, HttpServletResponse resp, @RequestParam("name") String name) {
		String result = demoService.get(name);
		return result;
	}

}
